class CabinetListModel {
  int? regionId;
  String? regionName;
  String? deviceName;
  int? deviceType;
  String? deviceAddress;
  String? creationTime;
  String? disPlayNo;
  int? id;
  int? branchId;
  int? deviceNo;
  Region? region;

  CabinetListModel({
    this.regionId,
    this.regionName,
    this.deviceName,
    this.deviceType,
    this.deviceAddress,
    this.creationTime,
    this.disPlayNo,
    this.id,
    this.branchId,
    this.deviceNo,
    this.region,
  });

  CabinetListModel.fromJson(Map<String, dynamic> json) {
    regionId = json['regionId'];
    regionName = json['regionName'];
    deviceName = json['deviceName'];
    deviceType = json['deviceType'];
    deviceAddress = json['deviceAddress'];
    creationTime = json['creationTime'];
    disPlayNo = json['disPlayNo'];
    id = json['id'];
    branchId = json['branchId'];
    deviceNo = json['deviceNo'];
    region = json['region'] != null ? new Region.fromJson(json['region']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['regionId'] = this.regionId;
    data['regionName'] = this.regionName;
    data['deviceName'] = this.deviceName;
    data['deviceType'] = this.deviceType;
    data['deviceAddress'] = this.deviceAddress;
    data['creationTime'] = this.creationTime;
    data['disPlayNo'] = this.disPlayNo;
    data['id'] = this.id;
    data['branchId'] = this.branchId;
    data['deviceNo'] = this.deviceNo;
    if (this.region != null) {
      data['region'] = this.region!.toJson();
    }
    return data;
  }
}

class Region {
  int? id;
  String? deletionTime;
  String? regionCode;
  String? lastModifierUserId;
  String? creatorUserId;
  bool? isDeleted;
  String? code;
  int? level;
  String? fullName;
  String? children;
  String? deleterUserId;
  String? lastModificationTime;
  String? creationTime;
  String? name;
  int? parentId;

  Region({this.id, this.deletionTime, this.regionCode, this.lastModifierUserId, this.creatorUserId, this.isDeleted, this.code, this.level, this.fullName, this.children, this.deleterUserId, this.lastModificationTime, this.creationTime, this.name, this.parentId});

  Region.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    deletionTime = json['deletionTime'];
    regionCode = json['regionCode'];
    lastModifierUserId = json['lastModifierUserId'];
    creatorUserId = json['creatorUserId'];
    isDeleted = json['isDeleted'];
    code = json['code'];
    level = json['level'];
    fullName = json['fullName'];
    children = json['children'];
    deleterUserId = json['deleterUserId'];
    lastModificationTime = json['lastModificationTime'];
    creationTime = json['creationTime'];
    name = json['name'];
    parentId = json['parentId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['deletionTime'] = this.deletionTime;
    data['regionCode'] = this.regionCode;
    data['lastModifierUserId'] = this.lastModifierUserId;
    data['creatorUserId'] = this.creatorUserId;
    data['isDeleted'] = this.isDeleted;
    data['code'] = this.code;
    data['level'] = this.level;
    data['fullName'] = this.fullName;
    data['children'] = this.children;
    data['deleterUserId'] = this.deleterUserId;
    data['lastModificationTime'] = this.lastModificationTime;
    data['creationTime'] = this.creationTime;
    data['name'] = this.name;
    data['parentId'] = this.parentId;
    return data;
  }
}
